#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# description: ftrace - stacktrace filter command
# flags: instance

[ ! -f set_ftrace_filter ] && exit_unsupported

echo _do_fork:stacktrace >> set_ftrace_filter

grep -q "_do_fork:stacktrace:unlimited" set_ftrace_filter

(echo "forked"; sleep 1)

grep -q "<stack trace>" trace
